using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using DevExpress.XtraReports.UI;
using DevExpress.Data.Filtering;
namespace ChuanPlus.Reports
{
    public partial class PurchaseOrder : DevExpress.XtraReports.UI.XtraReport
    {
        private int recordCount;
        public PurchaseOrder()
        {
            InitializeComponent();
           
        }

        private void Detail_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {
           xpColOrder.Criteria = new BinaryOperator("OrderID", paramOrderID.Value.ToString());
           foreach (Order item in xpColOrder)
           {
               DAO.OrderDAO.CalculateSubTotal(item);
           }
           recordCount = 0;
        }

        private void Detail1_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {
           
          
        }

        private void xrTableRow2_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {
            
        }

        private void xrTableCell7_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {
            //object obj = GetCurrentColumnValue("UnitPrice");
        }


        private void lblRecordNum_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {
            lblRecordNum.Text = (++recordCount).ToString();
        }

    }
}
